//2009/08/13 23:55:02
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class TitleString
{
public:
    string toFirstUpperCase(string title)
    {
		if(title[0] >= 'a' && title[0] <= 'z') title[0] -= 32;
		for(int i=1; i<title.size(); i++)
		{
			if(title[i-1]==' ' && isalpha(title[i])) title[i] -= 32;
		}
		return title;
    }
};
